package demo.controller;

import com.alibaba.nacos.shaded.org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @date: 2023/2/25 10:22
 */
@RestController
@RequestMapping("/order")
public class OrderController {
    @Autowired
    private Environment env;

    @GetMapping("/deduct")
    public boolean deduct(Integer sum) {
        System.out.println(env.getProperty("server.port"));
        System.out.println("下单了" + sum + "数量");
        return true;
    }

}
